home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 October: Mac OS SDK / Dev.CD Oct 00 SDK1.toast / Development Kits / Cross Platform / QuickTime 4.1.2 Windows SDK / CIncludes / ImageCodec.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-04-12  |  62.5 KB  |  1,774 lines  |  [TEXT/R*ch]

  1. /*
  2.      File:        ImageCodec.h
  3.  
  4.      Contains:    QuickTime interfaces
  5.  
  6.      Version:    Technology:    
  7.                  Release:    QuickTime 4.1
  8.  
  9.      Copyright:    (c) 1990-1999 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __IMAGECODEC__
  18. #define __IMAGECODEC__
  19.  
  20. #ifndef __MACTYPES__
  21.     #include <MacTypes.h>
  22. #endif
  23.  
  24. #ifndef __QUICKDRAW__
  25.     #include <Quickdraw.h>
  26. #endif
  27.  
  28. #ifndef __IMAGECOMPRESSION__
  29.     #include <ImageCompression.h>
  30. #endif
  31.  
  32. #ifndef __COMPONENTS__
  33.     #include <Components.h>
  34. #endif
  35.  
  36. #ifndef __MOVIES__
  37.     #include <Movies.h>
  38. #endif
  39.  
  40. #ifndef __GXTYPES__
  41.     #include <GXTypes.h>
  42. #endif
  43.  
  44.  
  45.  
  46.  
  47. #if PRAGMA_ONCE
  48. #pragma once
  49. #endif
  50.  
  51. #ifdef __cplusplus
  52. extern "C" {
  53. #endif
  54.  
  55. #if PRAGMA_IMPORT
  56. #pragma import on
  57. #endif
  58.  
  59. #if PRAGMA_STRUCT_ALIGN
  60.     #pragma options align=mac68k
  61. #elif PRAGMA_STRUCT_PACKPUSH
  62.     #pragma pack(push, 2)
  63. #elif PRAGMA_STRUCT_PACK
  64.     #pragma pack(2)
  65. #endif
  66.  
  67.  
  68. /*    codec capabilities flags    */
  69. enum {
  70.     codecCanScale                = 1L << 0,
  71.     codecCanMask                = 1L << 1,
  72.     codecCanMatte                = 1L << 2,
  73.     codecCanTransform            = 1L << 3,
  74.     codecCanTransferMode        = 1L << 4,
  75.     codecCanCopyPrev            = 1L << 5,
  76.     codecCanSpool                = 1L << 6,
  77.     codecCanClipVertical        = 1L << 7,
  78.     codecCanClipRectangular        = 1L << 8,
  79.     codecCanRemapColor            = 1L << 9,
  80.     codecCanFastDither            = 1L << 10,
  81.     codecCanSrcExtract            = 1L << 11,
  82.     codecCanCopyPrevComp        = 1L << 12,
  83.     codecCanAsync                = 1L << 13,
  84.     codecCanMakeMask            = 1L << 14,
  85.     codecCanShift                = 1L << 15,
  86.     codecCanAsyncWhen            = 1L << 16,
  87.     codecCanShieldCursor        = 1L << 17,
  88.     codecCanManagePrevBuffer    = 1L << 18,
  89.     codecHasVolatileBuffer        = 1L << 19,                        /* codec requires redraw after window movement */
  90.     codecWantsRegionMask        = 1L << 20,
  91.     codecImageBufferIsOnScreen    = 1L << 21,                        /* old def of codec using overlay surface, = ( codecIsDirectToScreenOnly | codecUsesOverlaySurface | codecImageBufferIsOverlaySurface | codecSrcMustBeImageBuffer ) */
  92.     codecWantsDestinationPixels    = 1L << 22,
  93.     codecWantsSpecialScaling    = 1L << 23,
  94.     codecHandlesInputs            = 1L << 24,
  95.     codecCanDoIndirectSurface    = 1L << 25,                        /* codec can handle indirect surface (GDI) */
  96.     codecIsSequenceSensitive    = 1L << 26,
  97.     codecRequiresOffscreen        = 1L << 27,
  98.     codecRequiresMaskBits        = 1L << 28,
  99.     codecCanRemapResolution        = 1L << 29,
  100.     codecIsDirectToScreenOnly    = 1L << 30,                        /* codec can only decompress data to the screen */
  101.     codecCanLockSurface            = 1L << 31                        /* codec can lock destination surface, icm doesn't lock for you */
  102. };
  103.  
  104. /*    codec capabilities flags2    */
  105. enum {
  106.     codecUsesOverlaySurface        = 1L << 0,                        /* codec uses overlay surface */
  107.     codecImageBufferIsOverlaySurface = 1L << 1,                    /* codec image buffer is overlay surface, the bits in the buffer are on the screen */
  108.     codecSrcMustBeImageBuffer    = 1L << 2                        /* codec can only source data from an image buffer */
  109. };
  110.  
  111.  
  112. struct CodecCapabilities {
  113.     long                             flags;
  114.     short                             wantedPixelSize;
  115.     short                             extendWidth;
  116.     short                             extendHeight;
  117.     short                             bandMin;
  118.     short                             bandInc;
  119.     short                             pad;
  120.     unsigned long                     time;
  121.     long                             flags2;                        /* field new in QuickTime 4.0 */
  122. };
  123. typedef struct CodecCapabilities        CodecCapabilities;
  124. /*    codec condition flags    */
  125. enum {
  126.     codecConditionFirstBand        = 1L << 0,
  127.     codecConditionLastBand        = 1L << 1,
  128.     codecConditionFirstFrame    = 1L << 2,
  129.     codecConditionNewDepth        = 1L << 3,
  130.     codecConditionNewTransform    = 1L << 4,
  131.     codecConditionNewSrcRect    = 1L << 5,
  132.     codecConditionNewMask        = 1L << 6,
  133.     codecConditionNewMatte        = 1L << 7,
  134.     codecConditionNewTransferMode = 1L << 8,
  135.     codecConditionNewClut        = 1L << 9,
  136.     codecConditionNewAccuracy    = 1L << 10,
  137.     codecConditionNewDestination = 1L << 11,
  138.     codecConditionFirstScreen    = 1L << 12,
  139.     codecConditionDoCursor        = 1L << 13,
  140.     codecConditionCatchUpDiff    = 1L << 14,
  141.     codecConditionMaskMayBeChanged = 1L << 15,
  142.     codecConditionToBuffer        = 1L << 16,
  143.     codecConditionCodecChangedMask = 1L << 31
  144. };
  145.  
  146.  
  147. enum {
  148.     codecInfoResourceType        = FOUR_CHAR_CODE('cdci'),        /* codec info resource type */
  149.     codecInterfaceVersion        = 2                                /* high word returned in component GetVersion */
  150. };
  151.  
  152.  
  153. struct CDSequenceDataSourceQueueEntry {
  154.     void *                            nextBusy;
  155.  
  156.     long                             descSeed;
  157.     Handle                             dataDesc;
  158.     void *                            data;
  159.     long                             dataSize;
  160.  
  161.     long                             useCount;
  162.  
  163.     TimeValue                         frameTime;
  164.     TimeValue                         frameDuration;
  165.     TimeValue                         timeScale;
  166. };
  167. typedef struct CDSequenceDataSourceQueueEntry CDSequenceDataSourceQueueEntry;
  168. typedef CDSequenceDataSourceQueueEntry * CDSequenceDataSourceQueueEntryPtr;
  169.  
  170. struct CDSequenceDataSource {
  171.     long                             recordSize;
  172.  
  173.     void *                            next;
  174.  
  175.     ImageSequence                     seqID;
  176.     ImageSequenceDataSource         sourceID;
  177.     OSType                             sourceType;
  178.     long                             sourceInputNumber;
  179.     void *                            dataPtr;
  180.     Handle                             dataDescription;
  181.     long                             changeSeed;
  182.     ICMConvertDataFormatUPP         transferProc;
  183.     void *                            transferRefcon;
  184.     long                             dataSize;
  185.  
  186.                                                                 /* fields available in QT 3 and later */
  187.  
  188.     QHdrPtr                         dataQueue;                    /* queue of CDSequenceDataSourceQueueEntry structures*/
  189.  
  190.     void *                            originalDataPtr;
  191.     long                             originalDataSize;
  192.     Handle                             originalDataDescription;
  193.     long                             originalDataDescriptionSeed;
  194. };
  195. typedef struct CDSequenceDataSource        CDSequenceDataSource;
  196. typedef CDSequenceDataSource *            CDSequenceDataSourcePtr;
  197.  
  198. struct ICMFrameTimeInfo {
  199.     wide                             startTime;
  200.     long                             scale;
  201.     long                             duration;
  202. };
  203. typedef struct ICMFrameTimeInfo            ICMFrameTimeInfo;
  204. typedef ICMFrameTimeInfo *                ICMFrameTimeInfoPtr;
  205.  
  206. struct CodecCompressParams {
  207.     ImageSequence                     sequenceID;                    /* precompress,bandcompress */
  208.     ImageDescriptionHandle             imageDescription;            /* precompress,bandcompress */
  209.     Ptr                             data;
  210.     long                             bufferSize;
  211.     long                             frameNumber;
  212.     long                             startLine;
  213.     long                             stopLine;
  214.     long                             conditionFlags;
  215.     CodecFlags                         callerFlags;
  216.     CodecCapabilities *                capabilities;                /* precompress,bandcompress */
  217.     ICMProgressProcRecord             progressProcRecord;
  218.     ICMCompletionProcRecord         completionProcRecord;
  219.     ICMFlushProcRecord                 flushProcRecord;
  220.  
  221.     PixMap                             srcPixMap;                    /* precompress,bandcompress */
  222.     PixMap                             prevPixMap;
  223.     CodecQ                             spatialQuality;
  224.     CodecQ                             temporalQuality;
  225.     Fixed                             similarity;
  226.     DataRateParamsPtr                 dataRateParams;
  227.     long                             reserved;
  228.  
  229.                                                                 /* The following fields only exist for QuickTime 2.1 and greater */
  230.     UInt16                             majorSourceChangeSeed;
  231.     UInt16                             minorSourceChangeSeed;
  232.     CDSequenceDataSourcePtr         sourceData;
  233.  
  234.                                                                 /* The following fields only exit for QuickTime 2.5 and greater */
  235.     long                             preferredPacketSizeInBytes;
  236.  
  237.                                                                 /* The following fields only exit for QuickTime 3.0 and greater */
  238.     long                             requestedBufferWidth;        /* must set codecWantsSpecialScaling to indicate this field is valid*/
  239.     long                             requestedBufferHeight;        /* must set codecWantsSpecialScaling to indicate this field is valid*/
  240.  
  241.                                                                 /* The following fields only exit for QuickTime 4.0 and greater */
  242.     OSType                             wantedSourcePixelType;
  243. };
  244. typedef struct CodecCompressParams        CodecCompressParams;
  245.  
  246. struct CodecDecompressParams {
  247.     ImageSequence                     sequenceID;                    /* predecompress,banddecompress */
  248.     ImageDescriptionHandle             imageDescription;            /* predecompress,banddecompress */
  249.     Ptr                             data;
  250.     long                             bufferSize;
  251.     long                             frameNumber;
  252.     long                             startLine;
  253.     long                             stopLine;
  254.     long                             conditionFlags;
  255.     CodecFlags                         callerFlags;
  256.     CodecCapabilities *                capabilities;                /* predecompress,banddecompress */
  257.     ICMProgressProcRecord             progressProcRecord;
  258.     ICMCompletionProcRecord         completionProcRecord;
  259.     ICMDataProcRecord                 dataProcRecord;
  260.  
  261.     CGrafPtr                         port;                        /* predecompress,banddecompress */
  262.     PixMap                             dstPixMap;                    /* predecompress,banddecompress */
  263.     BitMapPtr                         maskBits;
  264.     PixMapPtr                         mattePixMap;
  265.     Rect                             srcRect;                    /* predecompress,banddecompress */
  266.     MatrixRecord *                    matrix;                        /* predecompress,banddecompress */
  267.     CodecQ                             accuracy;                    /* predecompress,banddecompress */
  268.     short                             transferMode;                /* predecompress,banddecompress */
  269.     ICMFrameTimePtr                 frameTime;                    /* banddecompress */
  270.     long                             reserved[1];
  271.                                                                 /* The following fields only exist for QuickTime 2.0 and greater */
  272.     SInt8                             matrixFlags;                /* high bit set if 2x resize */
  273.     SInt8                             matrixType;
  274.     Rect                             dstRect;                    /* only valid for simple transforms */
  275.                                                                 /* The following fields only exist for QuickTime 2.1 and greater */
  276.     UInt16                             majorSourceChangeSeed;
  277.     UInt16                             minorSourceChangeSeed;
  278.     CDSequenceDataSourcePtr         sourceData;
  279.  
  280.     RgnHandle                         maskRegion;
  281.  
  282.                                                                 /* The following fields only exist for QuickTime 2.5 and greater */
  283.  
  284.     OSType **                        wantedDestinationPixelTypes; /* Handle to 0-terminated list of OSTypes */
  285.  
  286.     long                             screenFloodMethod;
  287.     long                             screenFloodValue;
  288.     short                             preferredOffscreenPixelSize;
  289.  
  290.                                                                 /* The following fields only exist for QuickTime 3.0 and greater */
  291.     ICMFrameTimeInfoPtr             syncFrameTime;                /* banddecompress */
  292.     Boolean                         needUpdateOnTimeChange;        /* banddecompress */
  293.     Boolean                         enableBlackLining;
  294.     Boolean                         needUpdateOnSourceChange;    /* band decompress */
  295.     Boolean                         pad;
  296.  
  297.     long                             unused;
  298.  
  299.     CGrafPtr                         finalDestinationPort;
  300.  
  301.     long                             requestedBufferWidth;        /* must set codecWantsSpecialScaling to indicate this field is valid*/
  302.     long                             requestedBufferHeight;        /* must set codecWantsSpecialScaling to indicate this field is valid*/
  303.                                                                 /* The following fields only exist for QuickTime 4.0 and greater */
  304.     Rect                             displayableAreaOfRequestedBuffer; /* set in predecompress*/
  305.     Boolean                         requestedSingleField;
  306.     Boolean                         needUpdateOnNextIdle;
  307.     Boolean                         pad2[2];
  308.     long                             reserved2;
  309. };
  310. typedef struct CodecDecompressParams    CodecDecompressParams;
  311. enum {
  312.     matrixFlagScale2x            = 1L << 7,
  313.     matrixFlagScale1x            = 1L << 6,
  314.     matrixFlagScaleHalf            = 1L << 5
  315. };
  316.  
  317. enum {
  318.     kScreenFloodMethodNone        = 0,
  319.     kScreenFloodMethodKeyColor    = 1,
  320.     kScreenFloodMethodAlpha        = 2
  321. };
  322.  
  323. enum {
  324.     kFlushLastQueuedFrame        = 0,
  325.     kFlushFirstQueuedFrame        = 1
  326. };
  327.  
  328. enum {
  329.     kNewImageGWorldErase        = 1L << 0
  330. };
  331.  
  332. typedef CALLBACK_API( void , ImageCodecTimeTriggerProcPtr )(void *refcon);
  333. typedef STACK_UPP_TYPE(ImageCodecTimeTriggerProcPtr)             ImageCodecTimeTriggerUPP;
  334. #if OPAQUE_UPP_TYPES
  335.     EXTERN_API(ImageCodecTimeTriggerUPP)
  336.     NewImageCodecTimeTriggerUPP       (ImageCodecTimeTriggerProcPtr userRoutine);
  337.  
  338.     EXTERN_API(void)
  339.     DisposeImageCodecTimeTriggerUPP    (ImageCodecTimeTriggerUPP userUPP);
  340.  
  341.     EXTERN_API(void)
  342.     InvokeImageCodecTimeTriggerUPP    (void *                refcon,
  343.                                     ImageCodecTimeTriggerUPP userUPP);
  344.  
  345. #else
  346.     enum { uppImageCodecTimeTriggerProcInfo = 0x000000C0 };         /* pascal no_return_value Func(4_bytes) */
  347.     #define NewImageCodecTimeTriggerUPP(userRoutine)                 (ImageCodecTimeTriggerUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppImageCodecTimeTriggerProcInfo, GetCurrentArchitecture())
  348.     #define DisposeImageCodecTimeTriggerUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  349.     #define InvokeImageCodecTimeTriggerUPP(refcon, userUPP)         CALL_ONE_PARAMETER_UPP((userUPP), uppImageCodecTimeTriggerProcInfo, (refcon))
  350. #endif
  351. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  352. #define NewImageCodecTimeTriggerProc(userRoutine)                 NewImageCodecTimeTriggerUPP(userRoutine)
  353. #define CallImageCodecTimeTriggerProc(userRoutine, refcon)        InvokeImageCodecTimeTriggerUPP(refcon, userRoutine)
  354.  
  355. struct ImageSubCodecDecompressCapabilities {
  356.     long                             recordSize;                    /* sizeof(ImageSubCodecDecompressCapabilities)*/
  357.     long                             decompressRecordSize;        /* size of your codec's decompress record*/
  358.     Boolean                         canAsync;                    /* default true*/
  359.     UInt8                             pad0;
  360.                                                                 /* The following fields only exist for QuickTime 4.0 and greater */
  361.     UInt16                             suggestedQueueSize;
  362.     Boolean                         canProvideTrigger;
  363.     UInt8                             pad1[3];
  364. };
  365. typedef struct ImageSubCodecDecompressCapabilities ImageSubCodecDecompressCapabilities;
  366. enum {
  367.     kCodecFrameTypeUnknown        = 0,
  368.     kCodecFrameTypeKey            = 1,
  369.     kCodecFrameTypeDifference    = 2,
  370.     kCodecFrameTypeDroppableDifference = 3
  371. };
  372.  
  373.  
  374. struct ImageSubCodecDecompressRecord {
  375.     Ptr                             baseAddr;
  376.     long                             rowBytes;
  377.     Ptr                             codecData;
  378.     ICMProgressProcRecord             progressProcRecord;
  379.     ICMDataProcRecord                 dataProcRecord;
  380.     void *                            userDecompressRecord;        /* pointer to codec-specific per-band data*/
  381.     UInt8                             frameType;
  382.     UInt8                             pad[3];
  383.     long                             priv[2];
  384. };
  385. typedef struct ImageSubCodecDecompressRecord ImageSubCodecDecompressRecord;
  386. /*
  387.   These data structures are used by code that wants to pass planar pixmap 
  388.    information around.
  389.   The structure below gives the basic idea of what is being done.
  390.   Normal instances of code will use a fixed number of planes (eg YUV420 uses 
  391.    three planes, Y, U and V). Each such code instance will define its own
  392.    version of the PlanarPixMapInfo struct counting the number of planes it 
  393.    needs along with defining constants that specify the meanings of each
  394.    plane.
  395. */
  396.  
  397. struct PlanarComponentInfo {
  398.     SInt32                             offset;
  399.     UInt32                             rowBytes;
  400. };
  401. typedef struct PlanarComponentInfo        PlanarComponentInfo;
  402.  
  403. struct PlanarPixMapInfo {
  404.     PlanarComponentInfo             componentInfo[1];
  405. };
  406. typedef struct PlanarPixMapInfo            PlanarPixMapInfo;
  407.  
  408. struct PlanarPixmapInfoSorensonYUV9 {
  409.     PlanarComponentInfo             componentInfoY;
  410.     PlanarComponentInfo             componentInfoU;
  411.     PlanarComponentInfo             componentInfoV;
  412. };
  413. typedef struct PlanarPixmapInfoSorensonYUV9 PlanarPixmapInfoSorensonYUV9;
  414.  
  415. struct PlanarPixmapInfoYUV420 {
  416.     PlanarComponentInfo             componentInfoY;
  417.     PlanarComponentInfo             componentInfoCb;
  418.     PlanarComponentInfo             componentInfoCr;
  419. };
  420. typedef struct PlanarPixmapInfoYUV420    PlanarPixmapInfoYUV420;
  421. /* name of parameters or effect -- placed in root container, required */
  422. enum {
  423.     kParameterTitleName            = FOUR_CHAR_CODE('name'),
  424.     kParameterTitleID            = 1
  425. };
  426.  
  427. /* codec sub-type of parameters or effect -- placed in root container, required */
  428. enum {
  429.     kParameterWhatName            = FOUR_CHAR_CODE('what'),
  430.     kParameterWhatID            = 1
  431. };
  432.  
  433. /* effect version -- placed in root container, optional, but recommended */
  434. enum {
  435.     kParameterVersionName        = FOUR_CHAR_CODE('vers'),
  436.     kParameterVersionID            = 1
  437. };
  438.  
  439. /* is effect repeatable -- placed in root container, optional, default is TRUE*/
  440. enum {
  441.     kParameterRepeatableName    = FOUR_CHAR_CODE('pete'),
  442.     kParameterRepeatableID        = 1
  443. };
  444.  
  445. enum {
  446.     kParameterRepeatableTrue    = 1,
  447.     kParameterRepeatableFalse    = 0
  448. };
  449.  
  450. /* substitution codec in case effect is missing -- placed in root container, recommended */
  451. enum {
  452.     kParameterAlternateCodecName = FOUR_CHAR_CODE('subs'),
  453.     kParameterAlternateCodecID    = 1
  454. };
  455.  
  456. /* maximum number of sources -- placed in root container, required */
  457. enum {
  458.     kParameterSourceCountName    = FOUR_CHAR_CODE('srcs'),
  459.     kParameterSourceCountID        = 1
  460. };
  461.  
  462.  
  463. enum {
  464.     kParameterDependencyName    = FOUR_CHAR_CODE('deep'),
  465.     kParameterDependencyID        = 1
  466. };
  467.  
  468. enum {
  469.     kParameterListDependsUponColorProfiles = FOUR_CHAR_CODE('prof'),
  470.     kParameterListDependsUponFonts = FOUR_CHAR_CODE('font')
  471. };
  472.  
  473.  
  474. struct ParameterDependancyRecord {
  475.     long                             dependCount;
  476.     OSType                             depends[1];
  477. };
  478. typedef struct ParameterDependancyRecord ParameterDependancyRecord;
  479. /*
  480.    enumeration list in container -- placed in root container, optional unless used by a
  481.    parameter in the list
  482. */
  483. enum {
  484.     kParameterEnumList            = FOUR_CHAR_CODE('enum')
  485. };
  486.  
  487.  
  488. struct EnumValuePair {
  489.     long                             value;
  490.     Str255                             name;
  491. };
  492. typedef struct EnumValuePair            EnumValuePair;
  493.  
  494. struct EnumListRecord {
  495.     long                             enumCount;                    /* number of enumeration items to follow*/
  496.     EnumValuePair                     values[1];                    /* values and names for them, packed */
  497. };
  498. typedef struct EnumListRecord            EnumListRecord;
  499. /* atom type of parameter*/
  500. enum {
  501.     kParameterAtomTypeAndID        = FOUR_CHAR_CODE('type')
  502. };
  503.  
  504. enum {
  505.     kNoAtom                        = FOUR_CHAR_CODE('none'),        /* atom type for no data got/set*/
  506.     kAtomNoFlags                = 0x00000000,
  507.     kAtomNotInterpolated        = 0x00000001,                    /* atom can never be interpolated*/
  508.     kAtomInterpolateIsOptional    = 0x00000002,                    /* atom can be interpolated, but it is an advanced user operation*/
  509.     kAtomMayBeIndexed            = 0x00000004                    /* more than one value of atom can exist with accending IDs (ie, lists of colors)*/
  510. };
  511.  
  512.  
  513. struct ParameterAtomTypeAndID {
  514.     QTAtomType                         atomType;                    /* type of atom this data comes from/goes into*/
  515.     QTAtomID                         atomID;                        /* ID of atom this data comes from/goes into*/
  516.     long                             atomFlags;                    /* options for this atom*/
  517.     Str255                             atomName;                    /* name of this value type*/
  518. };
  519. typedef struct ParameterAtomTypeAndID    ParameterAtomTypeAndID;
  520. /* data type of a parameter*/
  521. enum {
  522.     kParameterDataType            = FOUR_CHAR_CODE('data')
  523. };
  524.  
  525. enum {
  526.     kParameterTypeDataLong        = kTweenTypeLong,                /* integer value*/
  527.     kParameterTypeDataFixed        = kTweenTypeFixed,                /* fixed point value*/
  528.     kParameterTypeDataRGBValue    = kTweenTypeRGBColor,            /* RGBColor data*/
  529.     kParameterTypeDataDouble    = kTweenTypeQTFloatDouble,        /* IEEE 64 bit floating point value*/
  530.     kParameterTypeDataText        = FOUR_CHAR_CODE('text'),        /* editable text item*/
  531.     kParameterTypeDataEnum        = FOUR_CHAR_CODE('enum'),        /* enumerated lookup value*/
  532.     kParameterTypeDataBitField    = FOUR_CHAR_CODE('bool'),        /* bit field value (something that holds boolean(s))*/
  533.     kParameterTypeDataImage        = FOUR_CHAR_CODE('imag')        /* reference to an image via Picture data*/
  534. };
  535.  
  536.  
  537. struct ParameterDataType {
  538.     OSType                             dataType;                    /* type of data this item is stored as*/
  539. };
  540. typedef struct ParameterDataType        ParameterDataType;
  541. /*
  542.    alternate (optional) data type -- main data type always required.  
  543.    Must be modified or deleted when modifying main data type.
  544.    Main data type must be modified when alternate is modified.
  545. */
  546. enum {
  547.     kParameterAlternateDataType    = FOUR_CHAR_CODE('alt1'),
  548.     kParameterTypeDataColorValue = FOUR_CHAR_CODE('cmlr'),        /* CMColor data (supported on machines with ColorSync)*/
  549.     kParameterTypeDataCubic        = FOUR_CHAR_CODE('cubi'),        /* cubic bezier(s) (no built-in support)*/
  550.     kParameterTypeDataNURB        = FOUR_CHAR_CODE('nurb')        /* nurb(s) (no built-in support)*/
  551. };
  552.  
  553.  
  554. struct ParameterAlternateDataEntry {
  555.     OSType                             dataType;                    /* type of data this item is stored as*/
  556.     QTAtomType                         alternateAtom;                /* where to store*/
  557. };
  558. typedef struct ParameterAlternateDataEntry ParameterAlternateDataEntry;
  559.  
  560. struct ParameterAlternateDataType {
  561.     long                             numEntries;
  562.     ParameterAlternateDataEntry     entries[1];
  563. };
  564. typedef struct ParameterAlternateDataType ParameterAlternateDataType;
  565. /* legal values for the parameter*/
  566. enum {
  567.     kParameterDataRange            = FOUR_CHAR_CODE('rang')
  568. };
  569.  
  570. enum {
  571.     kNoMinimumLongFixed            = 0x7FFFFFFF,                    /* ignore minimum/maxiumum values*/
  572.     kNoMaximumLongFixed            = (long)0x80000000,
  573.     kNoScaleLongFixed            = 0,                            /* don't perform any scaling of value*/
  574.     kNoPrecision                = (-1)                            /* allow as many digits as format*/
  575. };
  576.  
  577. /* 'text'*/
  578.  
  579. struct StringRangeRecord {
  580.     long                             maxChars;                    /* maximum length of string*/
  581.     long                             maxLines;                    /* number of editing lines to use (1 typical, 0 to default)*/
  582. };
  583. typedef struct StringRangeRecord        StringRangeRecord;
  584. /* 'long'*/
  585.  
  586. struct LongRangeRecord {
  587.     long                             minValue;                    /* no less than this*/
  588.     long                             maxValue;                    /* no more than this*/
  589.     long                             scaleValue;                    /* muliply content by this going in, divide going out*/
  590.     long                             precisionDigits;            /* # digits of precision when editing via typing*/
  591. };
  592. typedef struct LongRangeRecord            LongRangeRecord;
  593. /* 'enum'*/
  594.  
  595. struct EnumRangeRecord {
  596.     long                             enumID;                        /* 'enum' list in root container to search within*/
  597. };
  598. typedef struct EnumRangeRecord            EnumRangeRecord;
  599. /* 'fixd'*/
  600.  
  601. struct FixedRangeRecord {
  602.     Fixed                             minValue;                    /* no less than this*/
  603.     Fixed                             maxValue;                    /* no more than this*/
  604.     Fixed                             scaleValue;                    /* muliply content by this going in, divide going out*/
  605.     long                             precisionDigits;            /* # digits of precision when editing via typing*/
  606. };
  607. typedef struct FixedRangeRecord            FixedRangeRecord;
  608. /* 'doub'*/
  609.  
  610.     #define kNoMinimumDouble        (NAN)                    /* ignore minimum/maxiumum values */
  611.     #define kNoMaximumDouble        (NAN)
  612.     #define kNoScaleDouble            (0)                        /* don't perform any scaling of value */
  613.     struct DoubleRangeRecord
  614.         {
  615.         QTFloatDouble        minValue;            /* no less than this */
  616.         QTFloatDouble        maxValue;            /* no more than this */
  617.         QTFloatDouble        scaleValue;            /* muliply content by this going in, divide going out */
  618.         long                precisionDigits;    /* # digits of precision when editing via typing */
  619.         };
  620.     typedef struct DoubleRangeRecord DoubleRangeRecord;
  621.     
  622. /* 'bool'    */
  623.  
  624. struct BooleanRangeRecord {
  625.     long                             maskValue;                    /* value to mask on/off to set/clear the boolean*/
  626. };
  627. typedef struct BooleanRangeRecord        BooleanRangeRecord;
  628. /* 'rgb '*/
  629.  
  630. struct RGBRangeRecord {
  631.     RGBColor                         minColor;
  632.     RGBColor                         maxColor;
  633. };
  634. typedef struct RGBRangeRecord            RGBRangeRecord;
  635. /* 'imag'*/
  636. enum {
  637.     kParameterImageNoFlags        = 0,
  638.     kParameterImageIsPreset        = 1
  639. };
  640.  
  641. enum {
  642.     kStandardPresetGroup        = FOUR_CHAR_CODE('pset')
  643. };
  644.  
  645.  
  646. struct ImageRangeRecord {
  647.     long                             imageFlags;
  648.     OSType                             fileType;                    /* file type to contain the preset group (normally kStandardPresetGroup)*/
  649.     long                             replacedAtoms;                /* # atoms at this level replaced by this preset group*/
  650. };
  651. typedef struct ImageRangeRecord            ImageRangeRecord;
  652. /* union of all of the above*/
  653.  
  654.     struct ParameterRangeRecord
  655.         {
  656.         union 
  657.             {
  658.             LongRangeRecord        longRange;
  659.             EnumRangeRecord        enumRange;
  660.             FixedRangeRecord    fixedRange;
  661.             DoubleRangeRecord    doubleRange;
  662.             StringRangeRecord    stringRange;
  663.             BooleanRangeRecord    booleanRange;
  664.             RGBRangeRecord        rgbRange;
  665.             ImageRangeRecord    imageRange;
  666.             } u;
  667.         };
  668.     typedef struct ParameterRangeRecord ParameterRangeRecord;
  669.     
  670. /* UI behavior of a parameter*/
  671. enum {
  672.     kParameterDataBehavior        = FOUR_CHAR_CODE('ditl')
  673. };
  674.  
  675. enum {
  676.                                                                 /* items edited via typing*/
  677.     kParameterItemEditText        = FOUR_CHAR_CODE('edit'),        /* edit text box*/
  678.     kParameterItemEditLong        = FOUR_CHAR_CODE('long'),        /* long number editing box*/
  679.     kParameterItemEditFixed        = FOUR_CHAR_CODE('fixd'),        /* fixed point number editing box*/
  680.     kParameterItemEditDouble    = FOUR_CHAR_CODE('doub'),        /* double number editing box*/
  681.                                                                 /* items edited via control(s)*/
  682.     kParameterItemPopUp            = FOUR_CHAR_CODE('popu'),        /* pop up value for enum types*/
  683.     kParameterItemRadioCluster    = FOUR_CHAR_CODE('radi'),        /* radio cluster for enum types*/
  684.     kParameterItemCheckBox        = FOUR_CHAR_CODE('chex'),        /* check box for booleans*/
  685.     kParameterItemControl        = FOUR_CHAR_CODE('cntl'),        /* item controlled via a standard control of some type*/
  686.                                                                 /* special user items*/
  687.     kParameterItemLine            = FOUR_CHAR_CODE('line'),        /* line*/
  688.     kParameterItemColorPicker    = FOUR_CHAR_CODE('pick'),        /* color swatch & picker*/
  689.     kParameterItemGroupDivider    = FOUR_CHAR_CODE('divi'),        /* start of a new group of items*/
  690.     kParameterItemStaticText    = FOUR_CHAR_CODE('stat'),        /* display "parameter name" as static text*/
  691.     kParameterItemDragImage        = FOUR_CHAR_CODE('imag'),        /* allow image display, along with drag and drop*/
  692.                                                                 /* flags valid for lines and groups*/
  693.     kGraphicsNoFlags            = 0x00000000,                    /* no options for graphics*/
  694.     kGraphicsFlagsGray            = 0x00000001,                    /* draw lines with gray*/
  695.                                                                 /* flags valid for groups*/
  696.     kGroupNoFlags                = 0x00000000,                    /* no options for group -- may be combined with graphics options                        */
  697.     kGroupAlignText                = 0x00010000,                    /* edit text items in group have the same size*/
  698.     kGroupSurroundBox            = 0x00020000,                    /* group should be surrounded with a box*/
  699.     kGroupMatrix                = 0x00040000,                    /* side-by-side arrangement of group is okay*/
  700.     kGroupNoName                = 0x00080000,                    /* name of group should not be displayed above box*/
  701.                                                                 /* flags valid for popup/radiocluster/checkbox/control*/
  702.     kDisableControl                = 0x00000001,
  703.     kDisableWhenNotEqual        = (0x00000000 + kDisableControl),
  704.     kDisableWhenEqual            = (0x00000010 + kDisableControl),
  705.     kDisableWhenLessThan        = (0x00000020 + kDisableControl),
  706.     kDisableWhenGreaterThan        = (0x00000030 + kDisableControl), /* flags valid for popups*/
  707.     kPopupStoreAsString            = 0x00010000
  708. };
  709.  
  710.  
  711. struct ControlBehaviors {
  712.     QTAtomID                         groupID;                    /* group under control of this item*/
  713.     long                             controlValue;                /* control value for comparison purposes*/
  714. };
  715. typedef struct ControlBehaviors            ControlBehaviors;
  716.  
  717. struct ParameterDataBehavior {
  718.     OSType                             behaviorType;
  719.     long                             behaviorFlags;
  720.     union {
  721.         ControlBehaviors                 controls;
  722.     }                                 u;
  723. };
  724. typedef struct ParameterDataBehavior    ParameterDataBehavior;
  725. /* higher level purpose of a parameter or set of parameters*/
  726. enum {
  727.     kParameterDataUsage            = FOUR_CHAR_CODE('use ')
  728. };
  729.  
  730. enum {
  731.     kParameterUsagePixels        = FOUR_CHAR_CODE('pixl'),
  732.     kParameterUsageRectangle    = FOUR_CHAR_CODE('rect'),
  733.     kParameterUsagePoint        = FOUR_CHAR_CODE('xy  '),
  734.     kParameterUsage3DPoint        = FOUR_CHAR_CODE('xyz '),
  735.     kParameterUsageDegrees        = FOUR_CHAR_CODE('degr'),
  736.     kParameterUsageRadians        = FOUR_CHAR_CODE('rads'),
  737.     kParameterUsagePercent        = FOUR_CHAR_CODE('pcnt'),
  738.     kParameterUsageSeconds        = FOUR_CHAR_CODE('secs'),
  739.     kParameterUsageMilliseconds    = FOUR_CHAR_CODE('msec'),
  740.     kParameterUsageMicroseconds    = FOUR_CHAR_CODE('µsec'),
  741.     kParameterUsage3by3Matrix    = FOUR_CHAR_CODE('3by3'),
  742.     kParameterUsageCircularDegrees = FOUR_CHAR_CODE('degc'),
  743.     kParameterUsageCircularRadians = FOUR_CHAR_CODE('radc')
  744. };
  745.  
  746.  
  747. struct ParameterDataUsage {
  748.     OSType                             usageType;                    /* higher level purpose of the data or group*/
  749. };
  750. typedef struct ParameterDataUsage        ParameterDataUsage;
  751. /* default value(s) for a parameter*/
  752. enum {
  753.     kParameterDataDefaultItem    = FOUR_CHAR_CODE('dflt')
  754. };
  755.  
  756. /* atoms that help to fill in data within the info window */
  757. enum {
  758.     kParameterInfoLongName        = FOUR_CHAR_CODE('©nam'),
  759.     kParameterInfoCopyright        = FOUR_CHAR_CODE('©cpy'),
  760.     kParameterInfoDescription    = FOUR_CHAR_CODE('©inf'),
  761.     kParameterInfoWindowTitle    = FOUR_CHAR_CODE('©wnt'),
  762.     kParameterInfoPicture        = FOUR_CHAR_CODE('©pix'),
  763.     kParameterInfoManufacturer    = FOUR_CHAR_CODE('©man'),
  764.     kParameterInfoIDs            = 1
  765. };
  766.  
  767. /* flags for ImageCodecValidateParameters */
  768. enum {
  769.     kParameterValidationNoFlags    = 0x00000000,
  770.     kParameterValidationFinalValidation = 0x00000001
  771. };
  772.  
  773.  
  774. typedef long                             QTParameterValidationOptions;
  775. /* QTAtomTypes for atoms in image compressor settings containers*/
  776. enum {
  777.     kImageCodecSettingsFieldCount = FOUR_CHAR_CODE('fiel'),        /* Number of fields (UInt8) */
  778.     kImageCodecSettingsFieldOrdering = FOUR_CHAR_CODE('fdom'),    /* Ordering of fields (UInt8)*/
  779.     kImageCodecSettingsFieldOrderingF1F2 = 1,
  780.     kImageCodecSettingsFieldOrderingF2F1 = 2
  781. };
  782.  
  783.  
  784. /* Additional Image Description Extensions*/
  785. enum {
  786.     kColorInfoImageDescriptionExtension = FOUR_CHAR_CODE('colr'), /* image description extension describing the color properties     */
  787.     kPixelAspectRatioImageDescriptionExtension = FOUR_CHAR_CODE('pasp'), /* image description extension describing the pixel aspect ratio*/
  788.     kCleanApertureImageDescriptionExtension = FOUR_CHAR_CODE('clap') /* image description extension describing the pixel aspect ratio*/
  789. };
  790.  
  791.  
  792. /* Color Info Image Description Extension types*/
  793. enum {
  794.     kVideoColorInfoImageDescriptionExtensionType = FOUR_CHAR_CODE('nclc'), /* For video color descriptions (defined below)         */
  795.     kICCProfileColorInfoImageDescriptionExtensionType = FOUR_CHAR_CODE('prof') /* For ICC Profile color descriptions (not defined here)*/
  796. };
  797.  
  798.  
  799. /* Video Color Info Image Description Extensions*/
  800.  
  801. struct NCLCColorInfoImageDescriptionExtension {
  802.     OSType                             colorParamType;                /* Type of color parameter 'nclc'                     */
  803.     UInt16                             primaries;                    /* CIE 1931 xy chromaticity coordinates                */
  804.     UInt16                             transferFunction;            /* Nonlinear transfer function from RGB to ErEgEb    */
  805.     UInt16                             matrix;                        /* Matrix from ErEgEb to EyEcbEcr                    */
  806. };
  807. typedef struct NCLCColorInfoImageDescriptionExtension NCLCColorInfoImageDescriptionExtension;
  808. /* Primaries*/
  809. enum {
  810.     kQTPrimaries_ITU_R709_2        = 1,                            /* ITU-R BT.709-2, SMPTE 274M-1995, and SMPTE 296M-1997 */
  811.     kQTPrimaries_Unknown        = 2,                            /* Unknown */
  812.     kQTPrimaries_EBU_3213        = 5,                            /* EBU Tech. 3213 (1981) */
  813.     kQTPrimaries_SMPTE_C        = 6                                /* SMPTE C Primaries from SMPTE RP 145-1993 */
  814. };
  815.  
  816. /* Transfer Function*/
  817. enum {
  818.     kQTTransferFunction_ITU_R709_2 = 1,                            /* Recommendation ITU-R BT.709-2, SMPTE 274M-1995, SMPTE 296M-1997, SMPTE 293M-1996 and SMPTE 170M-1994 */
  819.     kQTTransferFunction_Unknown    = 2,                            /* Unknown */
  820.     kQTTransferFunction_SMPTE_240M_1995 = 7                        /* SMPTE 240M-1995 and interim color implementation of SMPTE 274M-1995 */
  821. };
  822.  
  823. /* Matrix*/
  824. enum {
  825.     kQTMatrix_ITU_R_709_2        = 1,                            /* Recommendation ITU-R BT.709-2 (1125/60/2:1 only), SMPTE 274M-1995 and SMPTE 296M-1997 */
  826.     kQTMatrix_Unknown            = 2,                            /* Unknown */
  827.     kQTMatrix_ITU_R_601_4        = 6,                            /* Recommendation ITU-R BT.601-4, Recommendation ITU-R BT.470-4 System B and G, SMPTE 170M-1994 and SMPTE 293M-1996 */
  828.     kQTMatrix_SMPTE_240M_1995    = 7                                /* SMPTE 240M-1995 and interim color implementation of SMPTE 274M-1995 */
  829. };
  830.  
  831.  
  832. /* Field/Frame Info Image Description (this remaps to FieldInfoImageDescriptionExtension)*/
  833.  
  834. struct FieldInfoImageDescriptionExtension2 {
  835.     UInt8                             fields;
  836.     UInt8                             detail;
  837. };
  838. typedef struct FieldInfoImageDescriptionExtension2 FieldInfoImageDescriptionExtension2;
  839. enum {
  840.     kQTFieldsProgressiveScan    = 1,
  841.     kQTFieldsInterlaced            = 2
  842. };
  843.  
  844. enum {
  845.     kQTFieldDetailUnknown        = 0,
  846.     kQTFieldDetailTemporalTopFirst = 1,
  847.     kQTFieldDetailTemporalBottomFirst = 6,
  848.     kQTFieldDetailSpatialFirstLineEarly = 9,
  849.     kQTFieldDetailSpatialFirstLineLate = 14
  850. };
  851.  
  852.  
  853. /* Pixel Aspect Ratio Image Description Extensions*/
  854.  
  855. struct PixelAspectRatioImageDescriptionExtension {
  856.     UInt32                             hSpacing;                    /* Horizontal Spacing */
  857.     UInt32                             vSpacing;                    /* Vertical Spacing */
  858. };
  859. typedef struct PixelAspectRatioImageDescriptionExtension PixelAspectRatioImageDescriptionExtension;
  860. /* Clean Aperture Image Description Extensions*/
  861.  
  862. struct CleanApertureImageDescriptionExtension {
  863.     UInt32                             cleanApertureWidthN;        /* width of clean aperture, numerator, denominator */
  864.     UInt32                             cleanApertureWidthD;
  865.     UInt32                             cleanApertureHeightN;        /* height of clean aperture, numerator, denominator*/
  866.     UInt32                             cleanApertureHeightD;
  867.     UInt32                             horizOffN;                    /* horizontal offset of clean aperture center minus (width-1)/2, numerator, denominator */
  868.     UInt32                             horizOffD;
  869.     UInt32                             vertOffN;                    /* vertical offset of clean aperture center minus (height-1)/2, numerator, denominator */
  870.     UInt32                             vertOffD;
  871. };
  872. typedef struct CleanApertureImageDescriptionExtension CleanApertureImageDescriptionExtension;
  873. typedef CALLBACK_API( ComponentResult , ImageCodecMPDrawBandProcPtr )(void *refcon, ImageSubCodecDecompressRecord *drp);
  874. typedef STACK_UPP_TYPE(ImageCodecMPDrawBandProcPtr)             ImageCodecMPDrawBandUPP;
  875. #if OPAQUE_UPP_TYPES
  876.     EXTERN_API(ImageCodecMPDrawBandUPP)
  877.     NewImageCodecMPDrawBandUPP       (ImageCodecMPDrawBandProcPtr userRoutine);
  878.  
  879.     EXTERN_API(void)
  880.     DisposeImageCodecMPDrawBandUPP    (ImageCodecMPDrawBandUPP userUPP);
  881.  
  882.     EXTERN_API(ComponentResult)
  883.     InvokeImageCodecMPDrawBandUPP    (void *                refcon,
  884.                                     ImageSubCodecDecompressRecord * drp,
  885.                                     ImageCodecMPDrawBandUPP    userUPP);
  886.  
  887. #else
  888.     enum { uppImageCodecMPDrawBandProcInfo = 0x000003F0 };             /* pascal 4_bytes Func(4_bytes, 4_bytes) */
  889.     #define NewImageCodecMPDrawBandUPP(userRoutine)                 (ImageCodecMPDrawBandUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppImageCodecMPDrawBandProcInfo, GetCurrentArchitecture())
  890.     #define DisposeImageCodecMPDrawBandUPP(userUPP)                 DisposeRoutineDescriptor(userUPP)
  891.     #define InvokeImageCodecMPDrawBandUPP(refcon, drp, userUPP)     (ComponentResult)CALL_TWO_PARAMETER_UPP((userUPP), uppImageCodecMPDrawBandProcInfo, (refcon), (drp))
  892. #endif
  893. /* support for pre-Carbon UPP routines: NewXXXProc and CallXXXProc */
  894. #define NewImageCodecMPDrawBandProc(userRoutine)                 NewImageCodecMPDrawBandUPP(userRoutine)
  895. #define CallImageCodecMPDrawBandProc(userRoutine, refcon, drp)    InvokeImageCodecMPDrawBandUPP(refcon, drp, userRoutine)
  896. /*    codec selectors 0-127 are reserved by Apple */
  897. /*    codec selectors 128-191 are subtype specific */
  898. /*    codec selectors 192-255 are vendor specific */
  899. /*    codec selectors 256-32767 are available for general use */
  900. /*    negative selectors are reserved by the Component Manager */
  901. EXTERN_API( ComponentResult )
  902. ImageCodecGetCodecInfo            (ComponentInstance         ci,
  903.                                  CodecInfo *            info)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0000, 0x7000, 0xA82A);
  904.  
  905. EXTERN_API( ComponentResult )
  906. ImageCodecGetCompressionTime    (ComponentInstance         ci,
  907.                                  PixMapHandle             src,
  908.                                  const Rect *            srcRect,
  909.                                  short                     depth,
  910.                                  CodecQ *                spatialQuality,
  911.                                  CodecQ *                temporalQuality,
  912.                                  unsigned long *        time)                                FIVEWORDINLINE(0x2F3C, 0x0016, 0x0001, 0x7000, 0xA82A);
  913.  
  914. EXTERN_API( ComponentResult )
  915. ImageCodecGetMaxCompressionSize    (ComponentInstance         ci,
  916.                                  PixMapHandle             src,
  917.                                  const Rect *            srcRect,
  918.                                  short                     depth,
  919.                                  CodecQ                 quality,
  920.                                  long *                    size)                                FIVEWORDINLINE(0x2F3C, 0x0012, 0x0002, 0x7000, 0xA82A);
  921.  
  922. EXTERN_API( ComponentResult )
  923. ImageCodecPreCompress            (ComponentInstance         ci,
  924.                                  CodecCompressParams *    params)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
  925.  
  926. EXTERN_API( ComponentResult )
  927. ImageCodecBandCompress            (ComponentInstance         ci,
  928.                                  CodecCompressParams *    params)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0004, 0x7000, 0xA82A);
  929.  
  930. EXTERN_API( ComponentResult )
  931. ImageCodecPreDecompress            (ComponentInstance         ci,
  932.                                  CodecDecompressParams * params)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0005, 0x7000, 0xA82A);
  933.  
  934. EXTERN_API( ComponentResult )
  935. ImageCodecBandDecompress        (ComponentInstance         ci,
  936.                                  CodecDecompressParams * params)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0006, 0x7000, 0xA82A);
  937.  
  938. EXTERN_API( ComponentResult )
  939. ImageCodecBusy                    (ComponentInstance         ci,
  940.                                  ImageSequence             seq)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
  941.  
  942. EXTERN_API( ComponentResult )
  943. ImageCodecGetCompressedImageSize (ComponentInstance     ci,
  944.                                  ImageDescriptionHandle  desc,
  945.                                  Ptr                     data,
  946.                                  long                     bufferSize,
  947.                                  ICMDataProcRecordPtr     dataProc,
  948.                                  long *                    dataSize)                            FIVEWORDINLINE(0x2F3C, 0x0014, 0x0008, 0x7000, 0xA82A);
  949.  
  950. EXTERN_API( ComponentResult )
  951. ImageCodecGetSimilarity            (ComponentInstance         ci,
  952.                                  PixMapHandle             src,
  953.                                  const Rect *            srcRect,
  954.                                  ImageDescriptionHandle  desc,
  955.                                  Ptr                     data,
  956.                                  Fixed *                similarity)                            FIVEWORDINLINE(0x2F3C, 0x0014, 0x0009, 0x7000, 0xA82A);
  957.  
  958. EXTERN_API( ComponentResult )
  959. ImageCodecTrimImage                (ComponentInstance         ci,
  960.                                  ImageDescriptionHandle  Desc,
  961.                                  Ptr                     inData,
  962.                                  long                     inBufferSize,
  963.                                  ICMDataProcRecordPtr     dataProc,
  964.                                  Ptr                     outData,
  965.                                  long                     outBufferSize,
  966.                                  ICMFlushProcRecordPtr     flushProc,
  967.                                  Rect *                    trimRect,
  968.                                  ICMProgressProcRecordPtr  progressProc)                    FIVEWORDINLINE(0x2F3C, 0x0024, 0x000A, 0x7000, 0xA82A);
  969.  
  970. EXTERN_API( ComponentResult )
  971. ImageCodecRequestSettings        (ComponentInstance         ci,
  972.                                  Handle                 settings,
  973.                                  Rect *                    rp,
  974.                                  ModalFilterUPP         filterProc)                            FIVEWORDINLINE(0x2F3C, 0x000C, 0x000B, 0x7000, 0xA82A);
  975.  
  976. EXTERN_API( ComponentResult )
  977. ImageCodecGetSettings            (ComponentInstance         ci,
  978.                                  Handle                 settings)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x000C, 0x7000, 0xA82A);
  979.  
  980. EXTERN_API( ComponentResult )
  981. ImageCodecSetSettings            (ComponentInstance         ci,
  982.                                  Handle                 settings)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x000D, 0x7000, 0xA82A);
  983.  
  984. EXTERN_API( ComponentResult )
  985. ImageCodecFlush                    (ComponentInstance         ci)                                    FIVEWORDINLINE(0x2F3C, 0x0000, 0x000E, 0x7000, 0xA82A);
  986.  
  987. EXTERN_API( ComponentResult )
  988. ImageCodecSetTimeCode            (ComponentInstance         ci,
  989.                                  void *                    timeCodeFormat,
  990.                                  void *                    timeCodeTime)                        FIVEWORDINLINE(0x2F3C, 0x0008, 0x000F, 0x7000, 0xA82A);
  991.  
  992. EXTERN_API( ComponentResult )
  993. ImageCodecIsImageDescriptionEquivalent (ComponentInstance  ci,
  994.                                  ImageDescriptionHandle  newDesc,
  995.                                  Boolean *                equivalent)                            FIVEWORDINLINE(0x2F3C, 0x0008, 0x0010, 0x7000, 0xA82A);
  996.  
  997. EXTERN_API( ComponentResult )
  998. ImageCodecNewMemory                (ComponentInstance         ci,
  999.                                  Ptr *                    data,
  1000.                                  Size                     dataSize,
  1001.                                  long                     dataUse,
  1002.                                  ICMMemoryDisposedUPP     memoryGoneProc,
  1003.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x0014, 0x0011, 0x7000, 0xA82A);
  1004.  
  1005. EXTERN_API( ComponentResult )
  1006. ImageCodecDisposeMemory            (ComponentInstance         ci,
  1007.                                  Ptr                     data)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0012, 0x7000, 0xA82A);
  1008.  
  1009. EXTERN_API( ComponentResult )
  1010. ImageCodecHitTestData            (ComponentInstance         ci,
  1011.                                  ImageDescriptionHandle  desc,
  1012.                                  void *                    data,
  1013.                                  Size                     dataSize,
  1014.                                  Point                     where,
  1015.                                  Boolean *                hit)                                FIVEWORDINLINE(0x2F3C, 0x0014, 0x0013, 0x7000, 0xA82A);
  1016.  
  1017. EXTERN_API( ComponentResult )
  1018. ImageCodecNewImageBufferMemory    (ComponentInstance         ci,
  1019.                                  CodecDecompressParams * params,
  1020.                                  long                     flags,
  1021.                                  ICMMemoryDisposedUPP     memoryGoneProc,
  1022.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x0010, 0x0014, 0x7000, 0xA82A);
  1023.  
  1024. EXTERN_API( ComponentResult )
  1025. ImageCodecExtractAndCombineFields (ComponentInstance     ci,
  1026.                                  long                     fieldFlags,
  1027.                                  void *                    data1,
  1028.                                  long                     dataSize1,
  1029.                                  ImageDescriptionHandle  desc1,
  1030.                                  void *                    data2,
  1031.                                  long                     dataSize2,
  1032.                                  ImageDescriptionHandle  desc2,
  1033.                                  void *                    outputData,
  1034.                                  long *                    outDataSize,
  1035.                                  ImageDescriptionHandle  descOut)                            FIVEWORDINLINE(0x2F3C, 0x0028, 0x0015, 0x7000, 0xA82A);
  1036.  
  1037. EXTERN_API( ComponentResult )
  1038. ImageCodecGetMaxCompressionSizeWithSources (ComponentInstance  ci,
  1039.                                  PixMapHandle             src,
  1040.                                  const Rect *            srcRect,
  1041.                                  short                     depth,
  1042.                                  CodecQ                 quality,
  1043.                                  CDSequenceDataSourcePtr  sourceData,
  1044.                                  long *                    size)                                FIVEWORDINLINE(0x2F3C, 0x0016, 0x0016, 0x7000, 0xA82A);
  1045.  
  1046. EXTERN_API( ComponentResult )
  1047. ImageCodecSetTimeBase            (ComponentInstance         ci,
  1048.                                  void *                    base)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0017, 0x7000, 0xA82A);
  1049.  
  1050. EXTERN_API( ComponentResult )
  1051. ImageCodecSourceChanged            (ComponentInstance         ci,
  1052.                                  UInt32                 majorSourceChangeSeed,
  1053.                                  UInt32                 minorSourceChangeSeed,
  1054.                                  CDSequenceDataSourcePtr  sourceData,
  1055.                                  long *                    flagsOut)                            FIVEWORDINLINE(0x2F3C, 0x0010, 0x0018, 0x7000, 0xA82A);
  1056.  
  1057. EXTERN_API( ComponentResult )
  1058. ImageCodecFlushFrame            (ComponentInstance         ci,
  1059.                                  UInt32                 flags)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0019, 0x7000, 0xA82A);
  1060.  
  1061. EXTERN_API( ComponentResult )
  1062. ImageCodecGetSettingsAsText        (ComponentInstance         ci,
  1063.                                  Handle *                text)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x001A, 0x7000, 0xA82A);
  1064.  
  1065. EXTERN_API( ComponentResult )
  1066. ImageCodecGetParameterListHandle (ComponentInstance     ci,
  1067.                                  Handle *                parameterDescriptionHandle)            FIVEWORDINLINE(0x2F3C, 0x0004, 0x001B, 0x7000, 0xA82A);
  1068.  
  1069. EXTERN_API( ComponentResult )
  1070. ImageCodecGetParameterList        (ComponentInstance         ci,
  1071.                                  QTAtomContainer *        parameterDescription)                FIVEWORDINLINE(0x2F3C, 0x0004, 0x001C, 0x7000, 0xA82A);
  1072.  
  1073. EXTERN_API( ComponentResult )
  1074. ImageCodecCreateStandardParameterDialog (ComponentInstance  ci,
  1075.                                  QTAtomContainer         parameterDescription,
  1076.                                  QTAtomContainer         parameters,
  1077.                                  QTParameterDialogOptions  dialogOptions,
  1078.                                  DialogPtr                 existingDialog,
  1079.                                  short                     existingUserItem,
  1080.                                  QTParameterDialog *    createdDialog)                        FIVEWORDINLINE(0x2F3C, 0x0016, 0x001D, 0x7000, 0xA82A);
  1081.  
  1082. EXTERN_API( ComponentResult )
  1083. ImageCodecIsStandardParameterDialogEvent (ComponentInstance  ci,
  1084.                                  EventRecord *            pEvent,
  1085.                                  QTParameterDialog         createdDialog)                        FIVEWORDINLINE(0x2F3C, 0x0008, 0x001E, 0x7000, 0xA82A);
  1086.  
  1087. EXTERN_API( ComponentResult )
  1088. ImageCodecDismissStandardParameterDialog (ComponentInstance  ci,
  1089.                                  QTParameterDialog         createdDialog)                        FIVEWORDINLINE(0x2F3C, 0x0004, 0x001F, 0x7000, 0xA82A);
  1090.  
  1091. EXTERN_API( ComponentResult )
  1092. ImageCodecStandardParameterDialogDoAction (ComponentInstance  ci,
  1093.                                  QTParameterDialog         createdDialog,
  1094.                                  long                     action,
  1095.                                  void *                    params)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0020, 0x7000, 0xA82A);
  1096.  
  1097. EXTERN_API( ComponentResult )
  1098. ImageCodecNewImageGWorld        (ComponentInstance         ci,
  1099.                                  CodecDecompressParams * params,
  1100.                                  GWorldPtr *            newGW,
  1101.                                  long                     flags)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0021, 0x7000, 0xA82A);
  1102.  
  1103. EXTERN_API( ComponentResult )
  1104. ImageCodecDisposeImageGWorld    (ComponentInstance         ci,
  1105.                                  GWorldPtr                 theGW)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0022, 0x7000, 0xA82A);
  1106.  
  1107. EXTERN_API( ComponentResult )
  1108. ImageCodecHitTestDataWithFlags    (ComponentInstance         ci,
  1109.                                  ImageDescriptionHandle  desc,
  1110.                                  void *                    data,
  1111.                                  Size                     dataSize,
  1112.                                  Point                     where,
  1113.                                  long *                    hit,
  1114.                                  long                     hitFlags)                            FIVEWORDINLINE(0x2F3C, 0x0018, 0x0023, 0x7000, 0xA82A);
  1115.  
  1116. EXTERN_API( ComponentResult )
  1117. ImageCodecValidateParameters    (ComponentInstance         ci,
  1118.                                  QTAtomContainer         parameters,
  1119.                                  QTParameterValidationOptions  validationFlags,
  1120.                                  StringPtr                 errorString)                        FIVEWORDINLINE(0x2F3C, 0x000C, 0x0024, 0x7000, 0xA82A);
  1121.  
  1122. EXTERN_API( ComponentResult )
  1123. ImageCodecGetBaseMPWorkFunction    (ComponentInstance         ci,
  1124.                                  ComponentMPWorkFunctionUPP * workFunction,
  1125.                                  void **                refCon,
  1126.                                  ImageCodecMPDrawBandUPP  drawProc,
  1127.                                  void *                    drawProcRefCon)                        FIVEWORDINLINE(0x2F3C, 0x0010, 0x0025, 0x7000, 0xA82A);
  1128.  
  1129. EXTERN_API( ComponentResult )
  1130. ImageCodecPreflight                (ComponentInstance         ci,
  1131.                                  CodecDecompressParams * params)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0200, 0x7000, 0xA82A);
  1132.  
  1133. EXTERN_API( ComponentResult )
  1134. ImageCodecInitialize            (ComponentInstance         ci,
  1135.                                  ImageSubCodecDecompressCapabilities * cap)                    FIVEWORDINLINE(0x2F3C, 0x0004, 0x0201, 0x7000, 0xA82A);
  1136.  
  1137. EXTERN_API( ComponentResult )
  1138. ImageCodecBeginBand                (ComponentInstance         ci,
  1139.                                  CodecDecompressParams * params,
  1140.                                  ImageSubCodecDecompressRecord * drp,
  1141.                                  long                     flags)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0202, 0x7000, 0xA82A);
  1142.  
  1143. EXTERN_API( ComponentResult )
  1144. ImageCodecDrawBand                (ComponentInstance         ci,
  1145.                                  ImageSubCodecDecompressRecord * drp)                        FIVEWORDINLINE(0x2F3C, 0x0004, 0x0203, 0x7000, 0xA82A);
  1146.  
  1147. EXTERN_API( ComponentResult )
  1148. ImageCodecEndBand                (ComponentInstance         ci,
  1149.                                  ImageSubCodecDecompressRecord * drp,
  1150.                                  OSErr                     result,
  1151.                                  long                     flags)                                FIVEWORDINLINE(0x2F3C, 0x000A, 0x0204, 0x7000, 0xA82A);
  1152.  
  1153. EXTERN_API( ComponentResult )
  1154. ImageCodecQueueStarting            (ComponentInstance         ci)                                    FIVEWORDINLINE(0x2F3C, 0x0000, 0x0205, 0x7000, 0xA82A);
  1155.  
  1156. EXTERN_API( ComponentResult )
  1157. ImageCodecQueueStopping            (ComponentInstance         ci)                                    FIVEWORDINLINE(0x2F3C, 0x0000, 0x0206, 0x7000, 0xA82A);
  1158.  
  1159. EXTERN_API( ComponentResult )
  1160. ImageCodecDroppingFrame            (ComponentInstance         ci,
  1161.                                  const ImageSubCodecDecompressRecord * drp)                    FIVEWORDINLINE(0x2F3C, 0x0004, 0x0207, 0x7000, 0xA82A);
  1162.  
  1163. EXTERN_API( ComponentResult )
  1164. ImageCodecScheduleFrame            (ComponentInstance         ci,
  1165.                                  const ImageSubCodecDecompressRecord * drp,
  1166.                                  ImageCodecTimeTriggerUPP  triggerProc,
  1167.                                  void *                    triggerProcRefCon)                    FIVEWORDINLINE(0x2F3C, 0x000C, 0x0208, 0x7000, 0xA82A);
  1168.  
  1169. EXTERN_API( ComponentResult )
  1170. ImageCodecCancelTrigger            (ComponentInstance         ci)                                    FIVEWORDINLINE(0x2F3C, 0x0000, 0x0209, 0x7000, 0xA82A);
  1171.  
  1172.  
  1173.  
  1174.  
  1175. /* selectors for component calls */
  1176. enum {
  1177.     kImageCodecGetCodecInfoSelect                    = 0x0000,
  1178.     kImageCodecGetCompressionTimeSelect                = 0x0001,
  1179.     kImageCodecGetMaxCompressionSizeSelect            = 0x0002,
  1180.     kImageCodecPreCompressSelect                    = 0x0003,
  1181.     kImageCodecBandCompressSelect                    = 0x0004,
  1182.     kImageCodecPreDecompressSelect                    = 0x0005,
  1183.     kImageCodecBandDecompressSelect                    = 0x0006,
  1184.     kImageCodecBusySelect                            = 0x0007,
  1185.     kImageCodecGetCompressedImageSizeSelect            = 0x0008,
  1186.     kImageCodecGetSimilaritySelect                    = 0x0009,
  1187.     kImageCodecTrimImageSelect                        = 0x000A,
  1188.     kImageCodecRequestSettingsSelect                = 0x000B,
  1189.     kImageCodecGetSettingsSelect                    = 0x000C,
  1190.     kImageCodecSetSettingsSelect                    = 0x000D,
  1191.     kImageCodecFlushSelect                            = 0x000E,
  1192.     kImageCodecSetTimeCodeSelect                    = 0x000F,
  1193.     kImageCodecIsImageDescriptionEquivalentSelect    = 0x0010,
  1194.     kImageCodecNewMemorySelect                        = 0x0011,
  1195.     kImageCodecDisposeMemorySelect                    = 0x0012,
  1196.     kImageCodecHitTestDataSelect                    = 0x0013,
  1197.     kImageCodecNewImageBufferMemorySelect            = 0x0014,
  1198.     kImageCodecExtractAndCombineFieldsSelect        = 0x0015,
  1199.     kImageCodecGetMaxCompressionSizeWithSourcesSelect = 0x0016,
  1200.     kImageCodecSetTimeBaseSelect                    = 0x0017,
  1201.     kImageCodecSourceChangedSelect                    = 0x0018,
  1202.     kImageCodecFlushFrameSelect                        = 0x0019,
  1203.     kImageCodecGetSettingsAsTextSelect                = 0x001A,
  1204.     kImageCodecGetParameterListHandleSelect            = 0x001B,
  1205.     kImageCodecGetParameterListSelect                = 0x001C,
  1206.     kImageCodecCreateStandardParameterDialogSelect = 0x001D,
  1207.     kImageCodecIsStandardParameterDialogEventSelect = 0x001E,
  1208.     kImageCodecDismissStandardParameterDialogSelect = 0x001F,
  1209.     kImageCodecStandardParameterDialogDoActionSelect = 0x0020,
  1210.     kImageCodecNewImageGWorldSelect                    = 0x0021,
  1211.     kImageCodecDisposeImageGWorldSelect                = 0x0022,
  1212.     kImageCodecHitTestDataWithFlagsSelect            = 0x0023,
  1213.     kImageCodecValidateParametersSelect                = 0x0024,
  1214.     kImageCodecGetBaseMPWorkFunctionSelect            = 0x0025,
  1215.     kImageCodecPreflightSelect                        = 0x0200,
  1216.     kImageCodecInitializeSelect                        = 0x0201,
  1217.     kImageCodecBeginBandSelect                        = 0x0202,
  1218.     kImageCodecDrawBandSelect                        = 0x0203,
  1219.     kImageCodecEndBandSelect                        = 0x0204,
  1220.     kImageCodecQueueStartingSelect                    = 0x0205,
  1221.     kImageCodecQueueStoppingSelect                    = 0x0206,
  1222.     kImageCodecDroppingFrameSelect                    = 0x0207,
  1223.     kImageCodecScheduleFrameSelect                    = 0x0208,
  1224.     kImageCodecCancelTriggerSelect                    = 0x0209
  1225. };
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235. enum {
  1236.     kMotionJPEGTag                = FOUR_CHAR_CODE('mjpg'),
  1237.     kJPEGQuantizationTablesImageDescriptionExtension = FOUR_CHAR_CODE('mjqt'),
  1238.     kJPEGHuffmanTablesImageDescriptionExtension = FOUR_CHAR_CODE('mjht'),
  1239.     kFieldInfoImageDescriptionExtension = FOUR_CHAR_CODE('fiel') /* image description extension describing the field count and field orderings*/
  1240. };
  1241.  
  1242. enum {
  1243.     kFieldOrderUnknown            = 0,
  1244.     kFieldsStoredF1F2DisplayedF1F2 = 1,
  1245.     kFieldsStoredF1F2DisplayedF2F1 = 2,
  1246.     kFieldsStoredF2F1DisplayedF1F2 = 5,
  1247.     kFieldsStoredF2F1DisplayedF2F1 = 6
  1248. };
  1249.  
  1250.  
  1251. struct MotionJPEGApp1Marker {
  1252.     long                             unused;
  1253.     long                             tag;
  1254.     long                             fieldSize;
  1255.     long                             paddedFieldSize;
  1256.     long                             offsetToNextField;
  1257.     long                             qTableOffset;
  1258.     long                             huffmanTableOffset;
  1259.     long                             sofOffset;
  1260.     long                             sosOffset;
  1261.     long                             soiOffset;
  1262. };
  1263. typedef struct MotionJPEGApp1Marker        MotionJPEGApp1Marker;
  1264.  
  1265. struct FieldInfoImageDescriptionExtension {
  1266.     UInt8                             fieldCount;
  1267.     UInt8                             fieldOrderings;
  1268. };
  1269. typedef struct FieldInfoImageDescriptionExtension FieldInfoImageDescriptionExtension;
  1270.  
  1271. EXTERN_API( ComponentResult )
  1272. QTPhotoSetSampling                (ComponentInstance         codec,
  1273.                                  short                     yH,
  1274.                                  short                     yV,
  1275.                                  short                     cbH,
  1276.                                  short                     cbV,
  1277.                                  short                     crH,
  1278.                                  short                     crV)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0100, 0x7000, 0xA82A);
  1279.  
  1280. EXTERN_API( ComponentResult )
  1281. QTPhotoSetRestartInterval        (ComponentInstance         codec,
  1282.                                  unsigned short         restartInterval)                    FIVEWORDINLINE(0x2F3C, 0x0002, 0x0101, 0x7000, 0xA82A);
  1283.  
  1284. EXTERN_API( ComponentResult )
  1285. QTPhotoDefineHuffmanTable        (ComponentInstance         codec,
  1286.                                  short                     componentNumber,
  1287.                                  Boolean                 isDC,
  1288.                                  unsigned char *        lengthCounts,
  1289.                                  unsigned char *        values)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0102, 0x7000, 0xA82A);
  1290.  
  1291. EXTERN_API( ComponentResult )
  1292. QTPhotoDefineQuantizationTable    (ComponentInstance         codec,
  1293.                                  short                     componentNumber,
  1294.                                  unsigned char *        table)                                FIVEWORDINLINE(0x2F3C, 0x0006, 0x0103, 0x7000, 0xA82A);
  1295.  
  1296.  
  1297. /* selectors for component calls */
  1298. enum {
  1299.     kQTPhotoSetSamplingSelect                        = 0x0100,
  1300.     kQTPhotoSetRestartIntervalSelect                = 0x0101,
  1301.     kQTPhotoDefineHuffmanTableSelect                = 0x0102,
  1302.     kQTPhotoDefineQuantizationTableSelect            = 0x0103
  1303. };
  1304.  
  1305.  
  1306.  
  1307.  
  1308. /* source identifier -- placed in root container of description, one or more required */
  1309. enum {
  1310.     kEffectSourceName            = FOUR_CHAR_CODE('src ')
  1311. };
  1312.  
  1313.  
  1314. /* source type -- placed in the input map to identify the source kind */
  1315. enum {
  1316.     kEffectDataSourceType        = FOUR_CHAR_CODE('dtst')
  1317. };
  1318.  
  1319. /*  default effect types */
  1320. enum {
  1321.     kEffectRawSource            = 0,                            /* the source is raw image data*/
  1322.     kEffectGenericType            = FOUR_CHAR_CODE('geff')        /* generic effect for combining others*/
  1323. };
  1324.  
  1325. typedef struct EffectSource             EffectSource;
  1326.  
  1327. typedef EffectSource *                    EffectSourcePtr;
  1328.  
  1329. union SourceData {
  1330.     CDSequenceDataSourcePtr         image;
  1331.     EffectSourcePtr                 effect;
  1332. };
  1333. typedef union SourceData                SourceData;
  1334.  
  1335.  
  1336. struct EffectSource {
  1337.     long                             effectType;                    /* type of effect or kEffectRawSource if raw ICM data*/
  1338.     Ptr                             data;                        /* track data for this effect*/
  1339.     SourceData                         source;                        /* source/effect pointers*/
  1340.     EffectSourcePtr                 next;                        /* the next source for the parent effect*/
  1341.  
  1342.                                                                 /* fields added for QuickTime 4.0*/
  1343.     TimeValue                         lastTranslatedFrameTime;    /* start frame time of last converted frame, may be -1*/
  1344.     TimeValue                         lastFrameDuration;            /* duration of the last converted frame, may be zero*/
  1345.     TimeValue                         lastFrameTimeScale;            /* time scale of this source frame, only has meaning if above fields are valid*/
  1346. };
  1347.  
  1348.  
  1349. struct EffectsFrameParams {
  1350.     ICMFrameTimeRecord                 frameTime;                    /* timing data*/
  1351.     long                             effectDuration;                /* the duration of a single effect frame*/
  1352.     Boolean                         doAsync;                    /* set to true if the effect can go async*/
  1353.     unsigned char                     pad[3];
  1354.     EffectSourcePtr                 source;                        /* ptr to the source input tree*/
  1355.     void *                            refCon;                        /* storage for the effect*/
  1356. };
  1357. typedef struct EffectsFrameParams        EffectsFrameParams;
  1358. typedef EffectsFrameParams *            EffectsFrameParamsPtr;
  1359.  
  1360.  
  1361. EXTERN_API( ComponentResult )
  1362. ImageCodecEffectSetup            (ComponentInstance         effect,
  1363.                                  CodecDecompressParams * p)                                    FIVEWORDINLINE(0x2F3C, 0x0004, 0x0300, 0x7000, 0xA82A);
  1364.  
  1365. EXTERN_API( ComponentResult )
  1366. ImageCodecEffectBegin            (ComponentInstance         effect,
  1367.                                  CodecDecompressParams * p,
  1368.                                  EffectsFrameParamsPtr     ePtr)                                FIVEWORDINLINE(0x2F3C, 0x0008, 0x0301, 0x7000, 0xA82A);
  1369.  
  1370. EXTERN_API( ComponentResult )
  1371. ImageCodecEffectRenderFrame        (ComponentInstance         effect,
  1372.                                  EffectsFrameParamsPtr     p)                                    FIVEWORDINLINE(0x2F3C, 0x0004, 0x0302, 0x7000, 0xA82A);
  1373.  
  1374. EXTERN_API( ComponentResult )
  1375. ImageCodecEffectConvertEffectSourceToFormat (ComponentInstance  effect,
  1376.                                  EffectSourcePtr         sourceToConvert,
  1377.                                  ImageDescriptionHandle  requestedDesc)                        FIVEWORDINLINE(0x2F3C, 0x0008, 0x0303, 0x7000, 0xA82A);
  1378.  
  1379. EXTERN_API( ComponentResult )
  1380. ImageCodecEffectCancel            (ComponentInstance         effect,
  1381.                                  EffectsFrameParamsPtr     p)                                    FIVEWORDINLINE(0x2F3C, 0x0004, 0x0304, 0x7000, 0xA82A);
  1382.  
  1383. EXTERN_API( ComponentResult )
  1384. ImageCodecEffectGetSpeed        (ComponentInstance         effect,
  1385.                                  QTAtomContainer         parameters,
  1386.                                  Fixed *                pFPS)                                FIVEWORDINLINE(0x2F3C, 0x0008, 0x0305, 0x7000, 0xA82A);
  1387.  
  1388.  
  1389. enum {
  1390.     kSMPTENoFlag                = 0,
  1391.     kSMPTESmoothEdgeFlag        = 0x01,                            /* smooth edges of the stroke*/
  1392.     kSMPTEStrokeEdgeFlag        = 0x02                            /* stroke edge with color*/
  1393. };
  1394.  
  1395.  
  1396. typedef long                             SMPTEFlags;
  1397. typedef long                             SMPTEFrameReference;
  1398. enum {
  1399.     kSlideVerticalWipe            = 1,
  1400.     kSlideHorizontalWipe        = 2,
  1401.     kTopLeftWipe                = 3,
  1402.     kTopRightWipe                = 4,
  1403.     kBottomRightWipe            = 5,
  1404.     kBottomLeftWipe                = 6,
  1405.     kFourCornerWipe                = 7,
  1406.     kFourBoxWipe                = 8,
  1407.     kBarnVerticalWipe            = 21,
  1408.     kBarnHorizontalWipe            = 22,
  1409.     kTopCenterWipe                = 23,
  1410.     kRightCenterWipe            = 24,
  1411.     kBottomCenterWipe            = 25,
  1412.     kLeftCenterWipe                = 26,
  1413.     kDiagonalLeftDownWipe        = 41,
  1414.     kDiagonalRightDownWipe        = 42,
  1415.     kTopBottomBowTieWipe        = 43,
  1416.     kLeftRightBowTieWipe        = 44,
  1417.     kDiagonalLeftOutWipe        = 45,
  1418.     kDiagonalRightOutWipe        = 46,
  1419.     kDiagonalCrossWipe            = 47,
  1420.     kDiagonalBoxWipe            = 48,
  1421.     kFilledVWipe                = 61,
  1422.     kFilledVRightWipe            = 62,
  1423.     kFilledVBottomWipe            = 63,
  1424.     kFilledVLeftWipe            = 64,
  1425.     kHollowVWipe                = 65,
  1426.     kHollowVRightWipe            = 66,
  1427.     kHollowVBottomWipe            = 67,
  1428.     kHollowVLeftWipe            = 68,
  1429.     kVerticalZigZagWipe            = 71,
  1430.     kHorizontalZigZagWipe        = 72,
  1431.     kVerticalBarnZigZagWipe        = 73,
  1432.     kHorizontalBarnZigZagWipe    = 74
  1433. };
  1434.  
  1435. enum {
  1436.     kRectangleWipe                = 101,
  1437.     kDiamondWipe                = 102,
  1438.     kTriangleWipe                = 103,
  1439.     kTriangleRightWipe            = 104,
  1440.     kTriangleUpsideDownWipe        = 105,
  1441.     kTriangleLeftWipe            = 106,
  1442.     kSpaceShipWipe                = 107,
  1443.     kSpaceShipRightWipe            = 108,
  1444.     kSpaceShipUpsideDownWipe    = 109,
  1445.     kSpaceShipLeftWipe            = 110,
  1446.     kPentagonWipe                = 111,
  1447.     kPentagonUpsideDownWipe        = 112,
  1448.     kHexagonWipe                = 113,
  1449.     kHexagonSideWipe            = 114,
  1450.     kCircleWipe                    = 119,
  1451.     kOvalWipe                    = 120,
  1452.     kOvalSideWipe                = 121,
  1453.     kCatEyeWipe                    = 122,
  1454.     kCatEyeSideWipe                = 123,
  1455.     kRoundRectWipe                = 124,
  1456.     kRoundRectSideWipe            = 125,
  1457.     kFourPointStarWipe            = 127,
  1458.     kFivePointStarWipe            = 128,
  1459.     kStarOfDavidWipe            = 129,
  1460.     kHeartWipe                    = 130,
  1461.     kKeyholeWipe                = 131
  1462. };
  1463.  
  1464. enum {
  1465.     kRotatingTopWipe            = 201,
  1466.     kRotatingRightWipe            = 202,
  1467.     kRotatingBottomWipe            = 203,
  1468.     kRotatingLeftWipe            = 204,
  1469.     kRotatingTopBottomWipe        = 205,
  1470.     kRotatingLeftRightWipe        = 206,
  1471.     kRotatingQuadrantWipe        = 207,
  1472.     kTopToBottom180Wipe            = 211,
  1473.     kRightToLeft180Wipe            = 212,
  1474.     kTopToBottom90Wipe            = 213,
  1475.     kRightToLeft90Wipe            = 214,
  1476.     kTop180Wipe                    = 221,
  1477.     kRight180Wipe                = 222,
  1478.     kBottom180Wipe                = 223,
  1479.     kLeft180Wipe                = 224,
  1480.     kCounterRotatingTopBottomWipe = 225,
  1481.     kCounterRotatingLeftRightWipe = 226,
  1482.     kDoubleRotatingTopBottomWipe = 227,
  1483.     kDoubleRotatingLeftRightWipe = 228,
  1484.     kVOpenTopWipe                = 231,
  1485.     kVOpenRightWipe                = 232,
  1486.     kVOpenBottomWipe            = 233,
  1487.     kVOpenLeftWipe                = 234,
  1488.     kVOpenTopBottomWipe            = 235,
  1489.     kVOpenLeftRightWipe            = 236,
  1490.     kRotatingTopLeftWipe        = 241,
  1491.     kRotatingBottomLeftWipe        = 242,
  1492.     kRotatingBottomRightWipe    = 243,
  1493.     kRotatingTopRightWipe        = 244,
  1494.     kRotatingTopLeftBottomRightWipe = 245,
  1495.     kRotatingBottomLeftTopRightWipe = 246,
  1496.     kRotatingTopLeftRightWipe    = 251,
  1497.     kRotatingLeftTopBottomWipe    = 252,
  1498.     kRotatingBottomLeftRightWipe = 253,
  1499.     kRotatingRightTopBottomWipe    = 254,
  1500.     kRotatingDoubleCenterRightWipe = 261,
  1501.     kRotatingDoubleCenterTopWipe = 262,
  1502.     kRotatingDoubleCenterTopBottomWipe = 263,
  1503.     kRotatingDoubleCenterLeftRightWipe = 264
  1504. };
  1505.  
  1506. enum {
  1507.     kHorizontalMatrixWipe        = 301,
  1508.     kVerticalMatrixWipe            = 302,
  1509.     kTopLeftDiagonalMatrixWipe    = 303,
  1510.     kTopRightDiagonalMatrixWipe    = 304,
  1511.     kBottomRightDiagonalMatrixWipe = 305,
  1512.     kBottomLeftDiagonalMatrixWipe = 306,
  1513.     kClockwiseTopLeftMatrixWipe    = 310,
  1514.     kClockwiseTopRightMatrixWipe = 311,
  1515.     kClockwiseBottomRightMatrixWipe = 312,
  1516.     kClockwiseBottomLeftMatrixWipe = 313,
  1517.     kCounterClockwiseTopLeftMatrixWipe = 314,
  1518.     kCounterClockwiseTopRightMatrixWipe = 315,
  1519.     kCounterClockwiseBottomRightMatrixWipe = 316,
  1520.     kCounterClockwiseBottomLeftMatrixWipe = 317,
  1521.     kVerticalStartTopMatrixWipe    = 320,
  1522.     kVerticalStartBottomMatrixWipe = 321,
  1523.     kVerticalStartTopOppositeMatrixWipe = 322,
  1524.     kVerticalStartBottomOppositeMatrixWipe = 323,
  1525.     kHorizontalStartLeftMatrixWipe = 324,
  1526.     kHorizontalStartRightMatrixWipe = 325,
  1527.     kHorizontalStartLeftOppositeMatrixWipe = 326,
  1528.     kHorizontalStartRightOppositeMatrixWipe = 327,
  1529.     kDoubleDiagonalTopRightMatrixWipe = 328,
  1530.     kDoubleDiagonalBottomRightMatrixWipe = 329,
  1531.     kDoubleSpiralTopMatixWipe    = 340,
  1532.     kDoubleSpiralBottomMatixWipe = 341,
  1533.     kDoubleSpiralLeftMatixWipe    = 342,
  1534.     kDoubleSpiralRightMatixWipe    = 343,
  1535.     kQuadSpiralVerticalMatixWipe = 344,
  1536.     kQuadSpiralHorizontalMatixWipe = 345,
  1537.     kVerticalWaterfallLeftMatrixWipe = 350,
  1538.     kVerticalWaterfallRightMatrixWipe = 351,
  1539.     kHorizontalWaterfallLeftMatrixWipe = 352,
  1540.     kHorizontalWaterfallRightMatrixWipe = 353,
  1541.     kRandomWipe                    = 409,                            /* non-SMPTE standard numbers*/
  1542.     kRandomWipeGroupWipe        = 501,
  1543.     kRandomIrisGroupWipe        = 502,
  1544.     kRandomRadialGroupWipe        = 503,
  1545.     kRandomMatrixGroupWipe        = 504
  1546. };
  1547.  
  1548. typedef unsigned long                     SMPTEWipeType;
  1549. EXTERN_API( ComponentResult )
  1550. ImageCodecEffectPrepareSMPTEFrame (ComponentInstance     effect,
  1551.                                  PixMapPtr                 destPixMap,
  1552.                                  SMPTEFrameReference *    returnValue)                        FIVEWORDINLINE(0x2F3C, 0x0008, 0x0100, 0x7000, 0xA82A);
  1553.  
  1554. EXTERN_API( ComponentResult )
  1555. ImageCodecEffectDisposeSMPTEFrame (ComponentInstance     effect,
  1556.                                  SMPTEFrameReference     frameRef)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0101, 0x7000, 0xA82A);
  1557.  
  1558. EXTERN_API( ComponentResult )
  1559. ImageCodecEffectRenderSMPTEFrame (ComponentInstance     effect,
  1560.                                  PixMapPtr                 destPixMap,
  1561.                                  SMPTEFrameReference     frameRef,
  1562.                                  Fixed                     effectPercentageEven,
  1563.                                  Fixed                     effectPercentageOdd,
  1564.                                  Rect *                    pSourceRect,
  1565.                                  MatrixRecord *            pMatrix,
  1566.                                  SMPTEWipeType             effectNumber,
  1567.                                  long                     xRepeat,
  1568.                                  long                     yRepeat,
  1569.                                  SMPTEFlags             flags,
  1570.                                  Fixed                     penWidth,
  1571.                                  long                     strokeValue)                        FIVEWORDINLINE(0x2F3C, 0x0030, 0x0102, 0x7000, 0xA82A);
  1572.  
  1573.  
  1574. /* selectors for component calls */
  1575. enum {
  1576.     kImageCodecEffectSetupSelect                    = 0x0300,
  1577.     kImageCodecEffectBeginSelect                    = 0x0301,
  1578.     kImageCodecEffectRenderFrameSelect                = 0x0302,
  1579.     kImageCodecEffectConvertEffectSourceToFormatSelect = 0x0303,
  1580.     kImageCodecEffectCancelSelect                    = 0x0304,
  1581.     kImageCodecEffectGetSpeedSelect                    = 0x0305,
  1582.     kImageCodecEffectPrepareSMPTEFrameSelect        = 0x0100,
  1583.     kImageCodecEffectDisposeSMPTEFrameSelect        = 0x0101,
  1584.     kImageCodecEffectRenderSMPTEFrameSelect            = 0x0102
  1585. };
  1586.  
  1587.  
  1588. /* curve atom types and data structures */
  1589. enum {
  1590.     kCurvePathAtom                = FOUR_CHAR_CODE('path'),
  1591.     kCurveEndAtom                = FOUR_CHAR_CODE('zero'),
  1592.     kCurveAntialiasControlAtom    = FOUR_CHAR_CODE('anti'),
  1593.     kCurveAntialiasOff            = 0,
  1594.     kCurveAntialiasOn            = (long)0xFFFFFFFF,
  1595.     kCurveFillTypeAtom            = FOUR_CHAR_CODE('fill'),
  1596.     kCurvePenThicknessAtom        = FOUR_CHAR_CODE('pent'),
  1597.     kCurveMiterLimitAtom        = FOUR_CHAR_CODE('mitr'),
  1598.     kCurveJoinAttributesAtom    = FOUR_CHAR_CODE('join'),
  1599.     kCurveMinimumDepthAtom        = FOUR_CHAR_CODE('mind'),
  1600.     kCurveDepthAlwaysOffscreenMask = (long)0x80000000,
  1601.     kCurveTransferModeAtom        = FOUR_CHAR_CODE('xfer'),
  1602.     kCurveGradientAngleAtom        = FOUR_CHAR_CODE('angl'),
  1603.     kCurveGradientRadiusAtom    = FOUR_CHAR_CODE('radi'),
  1604.     kCurveGradientOffsetAtom    = FOUR_CHAR_CODE('cent')
  1605. };
  1606.  
  1607. enum {
  1608.     kCurveARGBColorAtom            = FOUR_CHAR_CODE('argb')
  1609. };
  1610.  
  1611.  
  1612. struct ARGBColor {
  1613.     unsigned short                     alpha;
  1614.     unsigned short                     red;
  1615.     unsigned short                     green;
  1616.     unsigned short                     blue;
  1617. };
  1618. typedef struct ARGBColor                ARGBColor;
  1619. enum {
  1620.     kCurveGradientRecordAtom    = FOUR_CHAR_CODE('grad')
  1621. };
  1622.  
  1623.  
  1624. struct GradientColorRecord {
  1625.     ARGBColor                         thisColor;
  1626.     Fixed                             endingPercentage;
  1627. };
  1628. typedef struct GradientColorRecord        GradientColorRecord;
  1629.  
  1630. typedef GradientColorRecord *            GradientColorPtr;
  1631. enum {
  1632.     kCurveGradientTypeAtom        = FOUR_CHAR_CODE('grdt')
  1633. };
  1634.  
  1635. /* currently supported gradient types */
  1636. enum {
  1637.     kLinearGradient                = 0,
  1638.     kCircularGradient            = 1
  1639. };
  1640.  
  1641. typedef long                             GradientType;
  1642. EXTERN_API( ComponentResult )
  1643. CurveGetLength                    (ComponentInstance         effect,
  1644.                                  gxPaths *                target,
  1645.                                  long                     index,
  1646.                                  wide *                    wideLength)                            FIVEWORDINLINE(0x2F3C, 0x000C, 0x0100, 0x7000, 0xA82A);
  1647.  
  1648. EXTERN_API( ComponentResult )
  1649. CurveLengthToPoint                (ComponentInstance         effect,
  1650.                                  gxPaths *                target,
  1651.                                  long                     index,
  1652.                                  Fixed                     length,
  1653.                                  FixedPoint *            location,
  1654.                                  FixedPoint *            tangent)                            FIVEWORDINLINE(0x2F3C, 0x0014, 0x0101, 0x7000, 0xA82A);
  1655.  
  1656. EXTERN_API( ComponentResult )
  1657. CurveNewPath                    (ComponentInstance         effect,
  1658.                                  Handle *                pPath)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0102, 0x7000, 0xA82A);
  1659.  
  1660. EXTERN_API( ComponentResult )
  1661. CurveCountPointsInPath            (ComponentInstance         effect,
  1662.                                  gxPaths *                aPath,
  1663.                                  unsigned long             contourIndex,
  1664.                                  unsigned long *        pCount)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0103, 0x7000, 0xA82A);
  1665.  
  1666. EXTERN_API( ComponentResult )
  1667. CurveGetPathPoint                (ComponentInstance         effect,
  1668.                                  gxPaths *                aPath,
  1669.                                  unsigned long             contourIndex,
  1670.                                  unsigned long             pointIndex,
  1671.                                  gxPoint *                thePoint,
  1672.                                  Boolean *                ptIsOnPath)                            FIVEWORDINLINE(0x2F3C, 0x0014, 0x0104, 0x7000, 0xA82A);
  1673.  
  1674. EXTERN_API( ComponentResult )
  1675. CurveInsertPointIntoPath        (ComponentInstance         effect,
  1676.                                  gxPoint *                aPoint,
  1677.                                  Handle                 thePath,
  1678.                                  unsigned long             contourIndex,
  1679.                                  unsigned long             pointIndex,
  1680.                                  Boolean                 ptIsOnPath)                            FIVEWORDINLINE(0x2F3C, 0x0012, 0x0105, 0x7000, 0xA82A);
  1681.  
  1682. EXTERN_API( ComponentResult )
  1683. CurveSetPathPoint                (ComponentInstance         effect,
  1684.                                  gxPaths *                aPath,
  1685.                                  unsigned long             contourIndex,
  1686.                                  unsigned long             pointIndex,
  1687.                                  gxPoint *                thePoint,
  1688.                                  Boolean                 ptIsOnPath)                            FIVEWORDINLINE(0x2F3C, 0x0012, 0x0106, 0x7000, 0xA82A);
  1689.  
  1690. EXTERN_API( ComponentResult )
  1691. CurveGetNearestPathPoint        (ComponentInstance         effect,
  1692.                                  gxPaths *                aPath,
  1693.                                  FixedPoint *            thePoint,
  1694.                                  unsigned long *        contourIndex,
  1695.                                  unsigned long *        pointIndex,
  1696.                                  Fixed *                theDelta)                            FIVEWORDINLINE(0x2F3C, 0x0014, 0x0107, 0x7000, 0xA82A);
  1697.  
  1698. EXTERN_API( ComponentResult )
  1699. CurvePathPointToLength            (ComponentInstance         ci,
  1700.                                  gxPaths *                aPath,
  1701.                                  Fixed                     startDist,
  1702.                                  Fixed                     endDist,
  1703.                                  FixedPoint *            thePoint,
  1704.                                  Fixed *                pLength)                            FIVEWORDINLINE(0x2F3C, 0x0014, 0x0108, 0x7000, 0xA82A);
  1705.  
  1706. EXTERN_API( ComponentResult )
  1707. CurveCreateVectorStream            (ComponentInstance         effect,
  1708.                                  Handle *                pStream)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0109, 0x7000, 0xA82A);
  1709.  
  1710. EXTERN_API( ComponentResult )
  1711. CurveAddAtomToVectorStream        (ComponentInstance         effect,
  1712.                                  OSType                 atomType,
  1713.                                  Size                     atomSize,
  1714.                                  void *                    pAtomData,
  1715.                                  Handle                 vectorStream)                        FIVEWORDINLINE(0x2F3C, 0x0010, 0x010A, 0x7000, 0xA82A);
  1716.  
  1717. EXTERN_API( ComponentResult )
  1718. CurveAddPathAtomToVectorStream    (ComponentInstance         effect,
  1719.                                  Handle                 pathData,
  1720.                                  Handle                 vectorStream)                        FIVEWORDINLINE(0x2F3C, 0x0008, 0x010B, 0x7000, 0xA82A);
  1721.  
  1722. EXTERN_API( ComponentResult )
  1723. CurveAddZeroAtomToVectorStream    (ComponentInstance         effect,
  1724.                                  Handle                 vectorStream)                        FIVEWORDINLINE(0x2F3C, 0x0004, 0x010C, 0x7000, 0xA82A);
  1725.  
  1726. EXTERN_API( ComponentResult )
  1727. CurveGetAtomDataFromVectorStream (ComponentInstance     effect,
  1728.                                  Handle                 vectorStream,
  1729.                                  long                     atomType,
  1730.                                  long *                    dataSize,
  1731.                                  Ptr *                    dataPtr)                            FIVEWORDINLINE(0x2F3C, 0x0010, 0x010D, 0x7000, 0xA82A);
  1732.  
  1733.  
  1734.  
  1735. /* selectors for component calls */
  1736. enum {
  1737.     kCurveGetLengthSelect                            = 0x0100,
  1738.     kCurveLengthToPointSelect                        = 0x0101,
  1739.     kCurveNewPathSelect                                = 0x0102,
  1740.     kCurveCountPointsInPathSelect                    = 0x0103,
  1741.     kCurveGetPathPointSelect                        = 0x0104,
  1742.     kCurveInsertPointIntoPathSelect                    = 0x0105,
  1743.     kCurveSetPathPointSelect                        = 0x0106,
  1744.     kCurveGetNearestPathPointSelect                    = 0x0107,
  1745.     kCurvePathPointToLengthSelect                    = 0x0108,
  1746.     kCurveCreateVectorStreamSelect                    = 0x0109,
  1747.     kCurveAddAtomToVectorStreamSelect                = 0x010A,
  1748.     kCurveAddPathAtomToVectorStreamSelect            = 0x010B,
  1749.     kCurveAddZeroAtomToVectorStreamSelect            = 0x010C,
  1750.     kCurveGetAtomDataFromVectorStreamSelect            = 0x010D
  1751. };
  1752. /* UPP call backs */
  1753.  
  1754. #if PRAGMA_STRUCT_ALIGN
  1755.     #pragma options align=reset
  1756. #elif PRAGMA_STRUCT_PACKPUSH
  1757.     #pragma pack(pop)
  1758. #elif PRAGMA_STRUCT_PACK
  1759.     #pragma pack()
  1760. #endif
  1761.  
  1762. #ifdef PRAGMA_IMPORT_OFF
  1763. #pragma import off
  1764. #elif PRAGMA_IMPORT
  1765. #pragma import reset
  1766. #endif
  1767.  
  1768. #ifdef __cplusplus
  1769. }
  1770. #endif
  1771.  
  1772. #endif /* __IMAGECODEC__ */
  1773.  
  1774.